package com.abc.controller;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

@Aspect
@Configuration
public class AspectDemo {
    @Pointcut("execution(* com.abc.controller.*.*(..))")
    public void dao(){
        System.out.println("dao");
    }

    @Pointcut("execution(* com.abc.controller.*.*(..))")
    public void dao1(){
        System.out.println("dao1");
    }

    @Before("dao()")
    public void bf() {
        System.out.println("before:fsdfasdf");
    }
    @After("dao1()")
    public void af() {
        System.out.println("after:after");
    }
}
